import http from './public'

// 获取用户列表
export const getAllUsers = (params) => {
  return http.fetchGet('/users/all', params)
}
export const getUserByName = (params) => {
  return http.fetchGet('/users/getByName', params)
}
// 新增用户
export const addUser = (params) => {
  return http.fetchPost('/users/add', params)
}

// 获取单个用户
export const getTheUser = (params) => {
  return http.fetchGet('/users/getById', params)
}

// 新增单位
export const addBusiness = (params) => {
  return http.fetchPost('/business/add', params)
}

// 驻商单位列表
export const getAllBusinesses = (params) => {
  return http.fetchGet('/business/all', params)
}

// 获取上一篇日报
export const getLastWork = (params) => {
  return http.fetchGet('/work/getLastWork', params)
}
// 获取当日日报
export const getWork = (params) => {
  return http.fetchGet('/work/get', params)
}

// 获取日报明细
export const getWorkList = (params) => {
  return http.fetchGet('/worklist/get', params)
}

// 保存日报
export const saveWork = (params) => {
  return http.fetchPost('/work/saveWork', params)
}

export const hasFinished = (params) => {
  return http.fetchPost('/work/hasFinished', params)
}

export const allFinished = (params) => {
  return http.fetchGet('/work/allFinished', params)
}
